package com.example.oop.Repository;

import com.example.oop.POJO.ChatRoom;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

@Repository
public interface ChatRoomRepository extends JpaRepository<ChatRoom, Integer> {
    Optional<ChatRoom> findByUsername(String username);

    Optional<ChatRoom> deleteByUsername(String username);
}
